package models

import (
	"github.com/goravel/framework/database/orm"
)

type LandFlag struct {
	orm.Model
	ActionTime      string         `gorm:"column:action_time;type:datetime(3);not null" form:"action_time" json:"action_time"`
	UserId          int            `gorm:"column:user_id;type:bigint(20) unsigned;not null" form:"user_id" json:"user_id"`
	UserName        string         `gorm:"column:user_name;type:varchar(255);not null" form:"user_name" json:"user_name"`
	StreamId        string         `gorm:"column:stream_id;type:varchar(255);not null" form:"stream_id" json:"stream_id"`
	FlagType        string         `gorm:"column:flag_type;type:varchar(255);not null" form:"flag_type" json:"flag_type"`
	FlagId          int            `gorm:"column:flag_id;type:bigint(20) unsigned;not null" form:"flag_id" json:"flag_id"`
	Location        string         `gorm:"column:location;type:varchar(255);not null" form:"location" json:"location"`
	OwnerId         int            `gorm:"column:owner_id;type:bigint(20) unsigned;not null" form:"owner_id" json:"owner_id"`
	OwnerName       string         `gorm:"column:owner_name;type:varchar(255);not null" form:"owner_name" json:"owner_name"`
	OwnerStreamId   string         `gorm:"column:owner_stream_id;type:varchar(255);not null" form:"owner_stream_id" json:"owner_stream_id"`
	OriginalText    string         `gorm:"column:original_text;type:text;not null;comment:'原文'" json:"original_text"`
	ConfigurationID int            `gorm:"column:configuration_id;type:int;null" form:"configuration_id" json:"configuration_id"`
	Configuration   *Configuration `gorm:"foreignkey:ConfigurationID" form:"-" json:"-"`
}

// TableName sets the insert table name for this struct type
func (l *LandFlag) TableName() string {
	return "landflags"
}
